<template>
	<view class="chat-list">
		<view class="pair-msg">
			<view v-if="pair_stu==0">
				<view class="p-item" @click="pairPage()">
					<view class="">
						<image src="/static/stu/jdxx.png" mode="aspectFit"></image>
						我的组员
					</view>	
					<text class="number" v-if="uncheck_number.length>0">{{uncheck_number.length}}</text>
				</view>
				<view class="p-item" @click="exampleList()">
					<view>
						<image src="/static/zytr.png" mode="aspectFit"></image>
						重要他人审核
					</view>
					<text class="number" v-if="shbyrwdss.length>0">{{shbyrwdss.length}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				grade_clas: [],
				cur_grade_clas: {},
				tabIndex: 0,
				tabs: ['师生交流', '结对消息'], //, '我的校园'
				filter_list: {},
				cur_option: '全部',
				cur_index: 0,
				search_text: '',
				
				tsList: [],
				showRequest: false,
				exampleMsgList: [],
				scholl_group: {},
				msgNewCount: -1,
				// 结对列表
				uncheck_number: [],
				shbyrwdss: [],
				shNumber: 0,
				pair_stu: 0,
				userInfo: getApp().globalData.userInfo,
				userId: '',
				baseInfo: getApp().globalData.baseInfo,
				stu_exam_page: 1,
				pairStudent: [],
				load_more: 'more',
				evaluation_all: false,

				share_posts_content: {}, // 想要分享的内容信息
				share_goals_info: {},
				newPrivateGroupMsg: {}
			}
		},
		onShow(){
			this.getUncheckNumber()

		},
		methods: {
			// 结对消息
			getUncheckNumber(){
				let msgTips = getApp().globalData.bdxs_shbyrwdss||{};
				if(!msgTips.bdxs){
					uni.$emit('getMsgTips', res => {
						this.getUncheckNumber()
					})
					return;
				}
				this.uncheck_number = msgTips.bdxs || [];
				this.shbyrwdss = msgTips.shbyrwdss.concat(msgTips.shbydss) || []
				this.shNumber = msgTips.bdxs.length + this.shbyrwdss.length;
				
				if (this.shNumber>0) {
					// uni.showTabBarRedDot({index: 2})
				}else if(!this.showRequest){
					this.utils.showRedDot()
				}
			},
			pairPage(){
				let pairType = getApp().globalData.teamMembersPairType
				pairType = pairType>0?pairType:1
				uni.navigateTo({
					url: '/pages/teachers/team-members?pairType='+pairType
				})
			},
			exampleList(){
				uni.navigateTo({
					url: '/pages/teachers/example-list'
				})
			}
		}
	}
</script>

<style lang="less">
	.chat-list{
		border-top: 2rpx solid #e4e4e4;
		
		.pair-msg{
			margin: 30rpx 32rpx 0;
		}
		.p-item{
			display: flex;
			justify-content: space-between;
			align-items: center;
			height: 100rpx;
			padding-right: 8rpx;
			border-bottom: 2rpx solid #ccc;
			image{
				width: 76rpx;
				height: 76rpx;
				vertical-align: -26rpx;
				margin-right: 48rpx;
			}
			.number{
				background-color: #ff0000;
				border-radius: 50%;
				min-width: 40rpx;
				height: 40rpx;
				padding: 0 8rpx;
				box-sizing: border-box;
				text-align: center;
				line-height: 40rpx;
				font-size: 24rpx;
				color: #fff;
			}
		}
	}
	
	.scholl-share{
		
		.sc-item{
			padding: 32rpx 24rpx;
			border-bottom: 24rpx solid #f2f2f2;
		}
		.info{
			display: flex;
			align-items: center;
			.head{
				width: 70rpx;
				height: 70rpx;
				border-radius: 35rpx;
				margin-right: 24rpx;
			}
			.name-time{
				.time{
					margin-top: 20rpx;
					font-size: 24rpx;
					color: #929292;
				}
			}
		}
		.content-btn{
			margin-top: 24rpx;
			.cont{
				font-size: 26rpx;
				line-height: 40rpx;
			}
			.images{
				margin-top: 40rpx;
			}
			.image{
				width: 212rpx;
				height: 212rpx;
				margin-right: 32rpx;
				&:nth-child(3n){
					margin-right: 0;
				}
			}
			.operation{
				margin-top: 40rpx;
				display: flex;
				justify-content: space-between;
				align-items: center;
			}
			.oper-btn{
				.uni-icons{
					margin-right: 8rpx;
				}
			}
		}
	}
	.add-content{
		position: fixed;
		
		/* #ifdef H5 */
		right: calc(var(--window-right) + 60rpx);
		bottom: calc(300rpx - 50px);
		/* #endif */
		/* #ifndef H5 */
		left: 60rpx;
		bottom: 300rpx;
		/* #endif */
		width: 88rpx;
		height: 88rpx;
		lighting-color: 88rpx;
		border-radius: 44rpx;
		background-color: #55acee;
		color: #fff;
		font-size: 56rpx;
		text-align: center;
	}
	
	.share-tips{
		position: fixed;
		
		background-color: #fff;
		border-radius: 10rpx;
		padding: 32rpx 16rpx 0;
		.title{
			
		}
		.head-name{
			margin-top: 32rpx;
		}
		.head{
			width: 56rpx;
			height: 56rpx;
			border-radius: 10rpx;
			margin-right: 24rpx;
		}
		.name{
			font-size: 26rpx;
			vertical-align: 16rpx;
		}
		.content{
			margin-top: 40rpx;
			font-size: 26rpx;
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
		}
		.cancel-confirm{
			margin-top: 24rpx;
			border-top: 2rpx solid #f2f2f2;
			text{
				display: inline-block;
				width: 50%;
				height: 80rpx;
				line-height: 80rpx;
				text-align: center;
				box-sizing: border-box;
			}
			.confirm{
				border-left: 2rpx solid #f2f2f2;
				color: #55acee;
			}
		}
	}
</style>
